package com.example.sneakerappforme1105.database;

import androidx.room.Database;
import androidx.room.RoomDatabase;

import com.example.sneakerappforme1105.bean.Address;
import com.example.sneakerappforme1105.bean.Cart;
import com.example.sneakerappforme1105.bean.CartItem;
import com.example.sneakerappforme1105.bean.Category;
import com.example.sneakerappforme1105.bean.Goods;
import com.example.sneakerappforme1105.bean.Order;
import com.example.sneakerappforme1105.bean.OrderItem;
import com.example.sneakerappforme1105.bean.User;
import com.example.sneakerappforme1105.dao.AddressDao;
import com.example.sneakerappforme1105.dao.CartDao;
import com.example.sneakerappforme1105.dao.CartItemDao;
import com.example.sneakerappforme1105.dao.CategoryDao;
import com.example.sneakerappforme1105.dao.GoodsDao;
import com.example.sneakerappforme1105.dao.OrderDao;
import com.example.sneakerappforme1105.dao.OrderItemDao;
import com.example.sneakerappforme1105.dao.UserDao;

@Database(entities = {User.class, Goods.class, Cart.class, CartItem.class, Order.class, OrderItem.class, Category.class, Address.class}, version = 12, exportSchema = false)
public abstract class AppDatabase extends RoomDatabase {
    // 获取该数据库中某张表的持久化对象
    public abstract UserDao userDao();
    public abstract GoodsDao goodsDao();
    public abstract CartDao cartDao();
    public abstract CartItemDao cartItemDao();
    public abstract OrderDao orderDao();
    public abstract OrderItemDao orderItemDao();
    public abstract CategoryDao categoryDao();
    public abstract AddressDao addressDao();
}
